package cn.com.bianguo.java.plugindemo.pluginmessagealiyun;

import cn.com.bianguo.java.plugindemo.pluginimpl.IMessagePlugin;
import org.pf4j.Extension;
import org.pf4j.Plugin;

public class AliyunPlugin extends Plugin {

    @Override
    public void start() {
        super.start();
        System.out.println("AliyunPlugin start");
    }

    @Override
    public void stop() {
        super.stop();
        System.out.println("AliyunPlugin stop");
    }

    @Extension
    public static class AliyunMessage implements IMessagePlugin {

        @Override
        public int pluginType() {
            return 1;
        }

        @Override
        public void sendMsg(String msg) {
            System.out.println("A li yun send msg : " + msg);
        }
    }
}
